package com.bestcem.xm.txtanls.controller.param.chart;

import com.bestcem.xm.txtanls.grpc.service.param.chart.BaseChartParam;
import com.bestcem.xm.txtanls.grpc.service.param.chart.WorkCloudParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.time.LocalDate;

/**
 * 词云参数
 *
 * @Author jy.zhao
 * @Date 2021/5/10 18:18
 * @Version 2.0
 **/
@Data
public class WorkCloudQuery extends BaseChartQuery {

    @ApiModelProperty(value = "话题id")
    private String topicId;

    public WorkCloudParam getWorkCloudParam() {
        BaseChartParam baseChartParam = super.getBaseChartParam();
        WorkCloudParam workCloudParam = new WorkCloudParam();
        BeanUtils.copyProperties(baseChartParam, workCloudParam);
        workCloudParam.setTopicId(topicId);
        return workCloudParam;
    }

    public WorkCloudQuery(String projectId, String fieldId, String filterType, String current, LocalDate startTime, LocalDate endTime, String topicId) {
        super(projectId, fieldId, filterType, current, startTime, endTime);
        this.topicId = topicId;
    }
}
